package com.baifc.wiringbean.soundsystem;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * projectName: springinaction
 * packageName: soundsystem
 * Created: 2019/4/22.
 * Auther: baifc
 * Description:
 */

public class SgtPeppers implements CompactDisc {

//    private String title = "Sgt. Peppers Lonely Heart Club Band";
//
//    private String artist = "The Beatles";
    @Value("${disc.title}")
    private String title;

    @Value("${disc.artist}")
    private String artist;

//    public SgtPeppers(String title, String artist) {
//        this.artist = artist;
//        this.title = title;
//    }

    public void play() {
        System.out.println("Playing " + title + " by " + artist);
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getArtist() {
        return artist;
    }

    public void setArtist(String artist) {
        this.artist = artist;
    }
}
